<% let scheme = site.customConfig.scheme %>
<div class="sidebar-wrapper box-shadow-wrapper <%= (scheme === 'muse' || scheme === 'mist')?'':'bg-color' %>">
  <div class="sidebar-item">
    <img class="site-author-image right-motion" src="<%= themeConfig.domain %>/images/avatar.png"/>
    <p class="site-author-name"><%= themeConfig.siteName %></p>
    <p class="site-description right-motion"><%= site.themeConfig.siteDescription %></p>
  </div>
  <div class="sidebar-item side-item-stat right-motion">
    <div class="sidebar-item-box">
      <a href="/archives/">
        <% let articles = 0; site.posts.forEach(function(post) { if (!post.hideInList) articles++;});%>
        <span class="site-item-stat-count"><%= articles %></span>
        <span class="site-item-stat-name">文章</span>
      </a>
    </div>
    <div class="sidebar-item-box">
      <a href="">
        <span class="site-item-stat-count"><%= site.tags.length %></span>
        <span class="site-item-stat-name">分类</span>
      </a>
    </div>
    <div class="sidebar-item-box">
      <a href="/tags/">
        <span class="site-item-stat-count"><%= site.tags.length %></span>
        <span class="site-item-stat-name">标签</span>
      </a>
    </div>
  </div>
  <% if (scheme !== 'muse' && scheme !== 'mist') { %>
    <% if(site.customConfig.rss) { %>
      <div class="sidebar-item">
        <span class="site-item-rss">
            <i class="fa fa-rss"></i>
            <a href="<%= themeConfig.domain %>/atom.xml" target="_blank">RSS</a>
        </span>
      </div>
    <% } else {%>
      <div class="sidebar-item" style="border-top: 1px dotted #ccc; margin-top: 10px;">
      </div>
    <% } %>
  <% } %>
  <% if ((site.customConfig.socials && site.customConfig.socials.length > 0) || (site.customConfig.imgSocials  && site.customConfig.imgSocials.length > 0)) { %>
    <div class="sidebar-item sidebar-item-social">
      <div class="social-item">
        <% if (site.customConfig.socials && site.customConfig.socials.length) { %>
          <% for(let i = 0; i < site.customConfig.socials.length; i++) { %>
            <a href="<%= site.customConfig.socials[i].socialLink %>">
              <i class="fa <%= site.customConfig.socials[i].socialIcon %>"></i> <%= site.customConfig.socials[i].socialName %>
            </a>
          <% } %>
        <% } %>
        <% if (site.customConfig.imgSocials && site.customConfig.imgSocials.length) { %>
          <% for(let i = 0; i < site.customConfig.imgSocials.length; i++) { %>
            <a class="social-img" href="#">
              <img src="<%= site.customConfig.cdn %><%= site.customConfig.imgSocials[i].socialImg %>" />
              <i class="fa <%= site.customConfig.imgSocials[i].socialIcon %>"></i> <%= site.customConfig.imgSocials[i].socialName %>
            </a>
          <% } %>
        <% } %>
      </div>
    </div>
  <% } %>
<% if (site.customConfig.bgMusic !== 'none' && site.customConfig.bgMusic === 'iframeLinks') { %>
  <div class="sidebar-item">
    <%- site.customConfig.iframeHtml %>
  </div>
<% } %>
<% if (site.customConfig.friends && site.customConfig.friends.length > 0) { %>
  <div class="sidebar-item right-motion sidebar-item-friends">
    <p class="friends-title"><i class="fa fa-globe"></i> <%= site.customConfig.friendsTitle %></p>
    <div class="friends-box">
      <% for (let i = 0; i < site.customConfig.friends.length; i++) {%>
        <p>
          <a href="<%= site.customConfig.friends[i].siteLink %>">【<%= site.customConfig.friends[i].siteName %>】</a>
        </p>
      <% } %>
    </div>
  </div>
<% } %>
</div>